package com.jiugang.cardump.mapper;

import com.jiugang.cardump.entity.Monitor;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2021-08-19
 */
public interface MonitorMapper extends BaseMapper<Monitor> {


    /**
     * @param equipmentId
     * @Decription 根据设备Id查询最新30条设备车钩状态
     * @return List<Monitor>
     */
    List<Monitor> selectEuipmentHookStatuList(@Param("equipmentId") String equipmentId);


    /**
     * @param equipmentId
     * @Decription 根据设备Id查询最新10条设备压车臂状态,不分页
     * @return List<Monitor>
     */
    List<Monitor> selectEuipmentPressArmStatuList(@Param("equipmentId") String equipmentId);


    /**
     * @param equipmentId
     * @Decription 根据表主键Id查询设备压车臂状态,分页
     * @return List<Monitor>
     */
    List<Monitor> selectEuipmentPressArmStatuPageList(@Param("equipmentId") String equipmentId,
                                                      @Param("page") Integer page,
                                                      @Param("size") Integer size,
                                                      @Param("searchStartTime") LocalDateTime searchStartTime,
                                                      @Param("searchEndTime") LocalDateTime searchEndTime);

    /**
     * @param equipmentId
     * @Decription 根据表主键Id查询设备压车臂状态条数
     * @return List<Monitor>
     */
    Integer selectEuipmentPressArmStatuPageListCount(@Param("equipmentId") String equipmentId,
                                                     @Param("searchStartTime") LocalDateTime searchStartTime,
                                                     @Param("searchEndTime") LocalDateTime searchEndTime);

    /**
     * @param equipmentId
     * @Decription 根据设备Id查询最新30条设备轨道状态
     * @return List<Monitor>
     */
    List<Monitor> selectEuipmentTrackStatuList(@Param("equipmentId") String equipmentId);

    /**
     * @param equipmentId
     * @Decription 根据表主键Id查询设备轨道状态,分页
     * @return List<Monitor>
     */
    List<Monitor> selectEquipmentTrackStatuPageList(@Param("equipmentId") String equipmentId,
                                                    @Param("page") Integer page,
                                                    @Param("size") Integer size,
                                                    @Param("searchStartTime") LocalDateTime searchStartTime,
                                                    @Param("searchEndTime") LocalDateTime searchEndTime);

}
